﻿using Mangox.Model.Common;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Mangox.Model.Stock
{

    public enum StockType
    {
        StockList = 1,

        StockETFList = 2,
        StockWeightList = 3,
        StockGangMeiList = 4,

        /// <summary>
        /// 涨跌家数
        /// </summary>
        MarketCountList = 5,
        /// <summary>
        /// 金融界，涨跌停
        /// </summary>
        zdt = 6,

        /// <summary>
        /// 行业涨幅
        /// </summary>
        TmtUpList,

        /// <summary>
        /// 行业跌幅
        /// </summary>
        TmtDownList,

        /// <summary>
        /// 概念涨幅
        /// </summary>
        ConceptUpList,

        /// <summary>
        /// 概念跌幅
        /// </summary>
        ConceptDownList,

        /// <summary>
        /// 个股涨幅排行
        /// </summary>
        IndUpList,

        /// <summary>
        /// 个股跌幅排行
        /// </summary>
        IndDownList

    }


    /// <summary>
    /// 腾讯网简要行情
    /// </summary>
    public class MarketBriefTencent
    {
        /// <summary>
        /// 接口获取时间
        /// </summary>
        public string UpdateTime { get; set; }

        /// <summary>
        /// 系统时间
        /// </summary>
        public string SystemTime
        {
            get
            {
                return DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss.fff");
            }
        }

        /// <summary>
        /// 交易状态
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string MksState { get; set; }

        /// <summary>
        /// 指数
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<MarketBriefStock> StockList { get; set; }

        /// <summary>
        /// ETF
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<MarketBriefStock> StockETFList { get; set; }

        /// <summary>
        /// 权重
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<MarketBriefStock> StockWeightList { get; set; }

        /// <summary>
        /// 港股美股
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<MarketBriefStock> StockGangMeiList { get; set; }

        /// <summary>
        /// 涨跌家数
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<MarketBriefCount> MarketCountList { get; set; }

        /// <summary>
        /// 金融界涨跌停家数
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public MarketModel zdt { get; set; }

        /// <summary>
        /// 行业涨幅排行
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<MarketBriefStock> TmtUpList { get; set; }

        /// <summary>
        /// 行业跌幅排行
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<MarketBriefStock> TmtDownList { get; set; }

        /// <summary>
        /// 概念涨幅排行
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<MarketBriefStock> ConceptUpList { get; set; }

        /// <summary>
        /// 概念跌幅排行
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<MarketBriefStock> ConceptDownList { get; set; }

        /// <summary>
        /// 个股涨幅排行
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<MarketBriefStock> IndUpList { get; set; }

        /// <summary>
        /// 个股跌幅排行
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public List<MarketBriefStock> IndDownList { get; set; }
    }

    /// <summary>
    /// 指数、ETF、个股行情；板块、概念，个股排行Model
    /// </summary>
    public class MarketBriefStock
    {
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string StockCode { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string StockName { get; set; }

        /// <summary>
        /// 市场类型
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public BazaarType BazaarType { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string XianJia { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string ZhangDieFu { get; set; }

        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string ZhangDieJia { get; set; }

        /// <summary>
        /// 公司家数
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string CptionCount { get; set; }

        /// <summary>
        /// 除以 100 //成交手数，成交量
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string ChengJiaoLiang { get; set; }

        /// <summary>
        /// 除以 10000  //成交额（亿）
        /// </summary>
        [JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
        public string ChengJiaoe { get; set; }
    }


    /// <summary>
    /// 涨跌平家数
    /// </summary>
    public class MarketBriefCount
    {
        public string StockCode { get; set; }
        public string StockName { get; set; }
        public string ZhangCount { get; set; }
        public string DieCount { get; set; }
        public string PingCount { get; set; }
    }










}
